package com.gl.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gl.entity.AclUser;
import com.gl.service.impl.AclUserServiceImpl;
import com.gl.utils.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-12-14
 */
@RestController
@RequestMapping("/user")
public class AclUserController {
        //注入service实现类对象
        @Autowired
        private AclUserServiceImpl userService;

        //后台登录
        @PostMapping("/login")
        public CommonResponse login(){
            return CommonResponse.ok().data("token","admin");
        }

        @GetMapping("/info")
        public CommonResponse info(){
            return CommonResponse.ok()
                    .data("roles","[admin]")
                    .data("name","admin")
                    .data("avatar","https://zjx-2020.oss-cn-beijing.aliyuncs.com/2020/11/22/5cdd717f86604a9199fd520018c3b752file.png");
        }




}

